package com.tedu.day02.test;

public class 匿名内部类 {
    public static void sain(String[] args){
      //  USB usb=new Jack();
      //  usb.read();usb.write();
        USB usb=new USB(){
            public void write(){
                System.out.println("写");
                public void read(){
                    System.out.println("读");
                }
            }
        };
    }
}
interface USb{
    public abstract void write();
}
//创建接口
class Jack implements USB{
    public void write(){
        System.out.println("写");
    }
    public void read(){
        System.out.println("读");
    }
}

abstract class Animal{
    public abstract void run();
    public abstract void sleep();
}
class v

//创建抽象类